home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / progjour / 1991 / 06 / alib / writfile.asm < prev   
Assembly Source File  |  1991-06-25  |  319b  |  29 lines

  1.     include    asm.inc
  2.  
  3.     public    write_to_file
  4.  
  5.     .code
  6.     extn    ms_dos
  7.  
  8.  
  9. ;;    write to file
  10. ;
  11. ;    entry    BX    file handle
  12. ;        CX    byte count
  13. ;        ES:DI    buffer
  14. ;    exit    Cf    if error
  15. ;
  16. write_to_file proc
  17.     push    ds
  18.     mov    ah,40h
  19.     push    es
  20.     pop    ds
  21.     xchg    dx,di
  22.     call    ms_dos
  23.     xchg    di,dx
  24.     pop    ds
  25.     ret
  26. write_to_file endp
  27.  
  28.     end
  29.